import {createRouter, createWebHashHistory} from 'vue-router'
import App from "../App.vue";
import Main from "../views/Main.vue";


const routes = [
    {
        path: '/',
        name: 'app',
        component: App,
        appHide: true
    },
    {
        path: '/main',
        name: '挂号收费',
        component: Main,
        myIcon: 'Document',
        children: [
            {
                path: '/onsite_registratiion',
                name: '窗口挂号',
                component: () => import("../views/registration/onsite_registratiion.vue")
            },
            {
                path: '/registration_record',
                name: '窗口退号',
                component: () => import("../views/registration/registration_record.vue")
            },
            {
                path: '/expense_charge',
                name: '收费',
                component: () => import("../views/registration/expense_charge.vue")
            },
            {
                path: '/expense_refund',
                name: '退费',
                component: () => import("../views/registration/expense_refund.vue")
            },
            {
                path: '/expense_manage',
                name: '费用记录查看',
                component: () => import("../views/registration/expense_manage.vue")
            }
        ]
    },
    {
        path: '/physician',
        name: '门诊医生',
        component: Main,
        myIcon: 'User',
        children: [
            {
                path: '/physician_patient',
                name: '患者查看',
                component: () => import("../views/physician/physician_patient.vue")
            },
            {
                path: '/home_medical_record',
                name: '医生诊疗：病历首页',
                component: () => import("../views/physician/home_medical_record.vue")
            },
            {
                path: '/check_request',
                name: '医生诊疗：检查申请',
                component: () => import("../views/physician/check_request.vue")
            },
            {
                path: '/physician-history',
                name: '看诊记录',
                component: () => import("../views/physician/physician-history.vue")
            },
            {
                path: '/check_results',
                name: '检查结果查看',
                component: () => import("../views/physician/check_results.vue")
            },
            {
                path: '/disposal_request',
                name: '处置申请',
                component: () => import("../views/physician/disposal_request.vue")
            },
            {
                path: '/expense_query',
                name: '费用查询',
                component: () => import("../views/physician/expense_query.vue")
            },
            {
                path: '/inspection_request',
                name: '检验申请',
                component: () => import("../views/physician/inspection_request.vue")
            },
            {
                path: '/inspection_results',
                name: 'inspection_results',
                component: () => import("../views/physician/inspection_results.vue")
            },
            {
                path: '/outpatient_diagnosis',
                name: '门诊确诊',
                component: () => import("../views/physician/outpatient_diagnosis.vue")
            },
            {
                path: '/write_prescription',
                name: '开立处方',
                component: () => import("../views/physician/write_prescription.vue")
            }
        ]
    },
    {
        path: '/check',
        name: '检查管理',
        component: Main,
        myIcon: 'Camera',
        children: [
            {
                path: '/check-apply',
                name: '检查申请',
                component: () => import("../views/check/check_apply.vue")
            },
            {
                path: '/check-patient',
                name: '患者录入',
                component: () => import("../views/check/check-patient.vue")
            },
            {
                path: '/check-input',
                name: '结果录入',
                component: () => import("../views/check/check_input.vue")
            },
            {
                path: '/check-manage',
                name: '检查管理',
                component: () => import("../views/check/check-manage.vue")
            }

        ]
    },
    {
        path: '/disposal',
        name: 'disposal',
        component: Main,
        myIcon: 'Headset',
        children: [
            {
                path: '/disposal_apply',
                name: 'disposal_apply',
                component: () => import("../views/disposal/disposal_apply.vue")
            },
            {
                path: '/disposal_input',
                name: 'disposal_input',
                component: () => import( "../views/disposal/disposal_input.vue")
            },
            {
                path: '/disposal_manage',
                name: 'disposal_manage',
                component: () => import("../views/disposal/disposal_manage.vue")
            },
            {
                path: '/disposal_patient',
                name: 'disposal_patient',
                component: () => import("../views/disposal/disposal_patient.vue")
            },
        ]
    },
    {
        path: '/drugstore',
        name: '药房管理',
        component: Main,
        myIcon: 'Wallet',
        children: [
            {
                path: '/give_medicine',
                name: '药房发药',
                component: () => import("../views/drugstore/give_medicine.vue")
            },
            {
                path: '/drug_medicine',
                name: 'drug_medicine',
                component: () => import("../views/drugstore/drug_medicine.vue")
            },
            {
                path: '/drug_store',
                name: 'drug_store',
                component: () => import("../views/drugstore/drug_storage.vue")
            },
            {
                path: '/tran_history',
                name: 'tran_history',
                component: () => import("../views/drugstore/tran_history.vue")
            },
        ]
    },
    {
        path: '/inspection',
        name: 'inspection',
        component: Main,
        myIcon: 'FirstAidKit',
        children: [
            {
                path: '/inspection_apply',
                name: 'inspection_apply',
                component: () => import("../views/inspection/inspection_apply.vue")
            },
            {
                path: '/inspection_input',
                name: 'inspection_input',
                component: () => import("../views/inspection/inspection_input.vue")
            },
            {
                path: '/inspection_manage',
                name: 'inspection_manage',
                component: () => import("../views/inspection/inspection_manage.vue")
            },
            {
                path: '/inspection_patient',
                name: 'inspection_patient',
                component: () => import("../views/inspection/inspection_patient.vue")
            },
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
